export { default as Constants } from "./constant";

export default {
  isSuccess: code => code === 0,
  isFunction: fn => Object.prototype.toString.call(fn) === "[object Function]",
  isObject: fn => Object.prototype.toString.call(fn) === "[object Object]",
  emptyFn: () => {},
  random: (max = 10, min = 0) => Math.ceil(Math.random() * (max - min)) + min,
  emptyPage: {
    totalCount: 0,
    pageSize: 0,
    total: 0,
    totalPage: 0,
    currPage: 1,
    list: null
  },
};

